#include("../../_inc/layout.html") 
#@layout() 
#define title()
<title>#(article.title??'标题') - LambkitCms</title>
#end 

#define style() 
#end 

#define content()
<div class="container_left">
	<dl>
		<dt>资讯类目</dt>
		#for(category : categories)
		<dd>
			<a href="#(ctx)/news/category/#(category.alias)">#(category.name??'类目')</a>
		</dd>
		#end
	</dl>
	<dl>
		<dt>资讯标签</dt>
		#for(tag : tags)
		<dd>
			<a href="#(ctx)/news/tag/#(tag.alias)">#(tag.name??'标签')</a>
		</dd>
		#end
	</dl>

</div>

<div class="container_main">
	<h3>#(article.title??'标题')</h3>
    <div>#(article.content??'内容')</div>
    <form id="commentForm" action="#(ctx)/blog/comment/#(article.articleId)" method="post">
        <textarea id="" name="content" style="width:100%;height:50px;"></textarea>
        <input id="submit" type="button" value="评论"/><!--{"code":1,"message":"success","data":1}-->
    </form>
    <dl>
        <dt>评论列表</dt>
        #for(comment : comments)
		<dd>#(comment.content??'评论内容')</dd>
		#end
    </dl>
</div>
#end 

#define script() 
<script>
$('#submit').click(function () {
    $.post($('#commentForm').attr('action'), $('#commentForm').serialize(), function (json) {
        if (json.code == 1) {
            location.reload();
        } else {
            alert(json.data);
        }
    })
});
</script>
#end